<?php

/**
 * @author thihien
 * @copyright 2011
 */
require_once('includes/general.php');
if(!tep_db_checkDb()) die('khong ket noi dc csdl');
$madanhmuc=$_GET['madanhmuc'];
$sql='select * from sanpham where madanhmuc='.$madanhmuc;
$kq=tep_db_query($sql);
$content='';
$content.='
    <div id="center">
        <div id="tt_sanpham">
            <div class="title"><h3>sản phẩm</h3></div>';
        while($item=tep_db_fetch_array($kq)){
            $content.='
             
            <div id="sanpham">
                <div id="hinhanh1"><a href="?masp='.$item['id'].'&madanhmucsp='.$item['madanhmuc'].'&mode=detail""><img   src="images/'.$item['hinhanh'].'"/></a></div>
                <div id="tensp1">'.$item['tensanpham'].'</div>
                <div id="gia1" style="color: red;" > Your Price:$'.$item['gia'].'.00</div>
                <div><a href="?masp='.$item['id'].'&madanhmucsp='.$item['madanhmuc'].'&mode=detail"">xem chi tiết...</a></div>
            </div>
                
                ';
                
        }
$content.='
        </div>
        <div id="phantrang"></div>
    </div> 
';
echo $content;
?>

